home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 1998 November / IRIX 6.5.2 Base Documentation November 1998.img / usr / share / catman / u_man / cat3 / Tk / restrictev.z / restrictev
Text File  |  1998-10-30  |  5KB  |  133 lines

  1.  
  2.  
  3.  
  4. TTTTkkkk____RRRReeeessssttttrrrriiiiccccttttEEEEvvvveeeennnnttttssss((((3333TTTTkkkk))))                                  TTTTkkkk____RRRReeeessssttttrrrriiiiccccttttEEEEvvvveeeennnnttttssss((((3333TTTTkkkk))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      Tk_RestrictEvents - filter and selectively delay X events
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      ####iiiinnnncccclllluuuuddddeeee <<<<ttttkkkk....hhhh>>>>
  13.  
  14.      Tk_RestrictProc *
  15.      TTTTkkkk____RRRReeeessssttttrrrriiiiccccttttEEEEvvvveeeennnnttttssss(_p_r_o_c, _a_r_g, _p_r_e_v_A_r_g_P_t_r)
  16.  
  17. AAAARRRRGGGGUUUUMMMMEEEENNNNTTTTSSSS
  18.      Tk_RestrictProc   *_p_r_o_c          (in)      Predicate procedure to call to
  19.                                                 filter incoming X events.
  20.                                                 NULL means do not restrict
  21.                                                 events at all.
  22.  
  23.      char              *_a_r_g           (in)      Arbitrary argument to pass to
  24.                                                 _p_r_o_c.
  25.  
  26.      char              **_p_r_e_v_A_r_g_P_t_r   (in/out)  Pointer to place to save
  27.                                                 argument to previous restrict
  28.                                                 procedure.
  29.  
  30.  
  31. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  32.      This procedure is useful in certain situations where applications are
  33.      only prepared to receive certain X events.  After TTTTkkkk____RRRReeeessssttttrrrriiiiccccttttEEEEvvvveeeennnnttttssss is
  34.      called, TTTTkkkk____DDDDooooOOOOnnnneeeeEEEEvvvveeeennnntttt (and hence TTTTkkkk____MMMMaaaaiiiinnnnLLLLoooooooopppp) will filter X input events
  35.      through _p_r_o_c.  _P_r_o_c indicates whether a given event is to be processed
  36.      immediately or deferred until some later time (e.g. when the event
  37.      restriction is lifted).  _P_r_o_c is a standard X predicate procedure, of the
  38.      sort passed to XXXXCCCChhhheeeecccckkkkIIIIffffEEEEvvvveeeennnntttt.  It must have arguments and result that
  39.      match the type TTTTkkkk____RRRReeeessssttttrrrriiiiccccttttPPPPrrrroooocccc:
  40.           typedef Bool Tk_RestrictProc(
  41.                Display *_d_i_s_p_l_a_y,
  42.                XEvent *_e_v_e_n_t_P_t_r,
  43.                char *_a_r_g);
  44.      The _d_i_s_p_l_a_y argument to _p_r_o_c is the display from which _e_v_e_n_t_P_t_r was
  45.      received, and _e_v_e_n_t_P_t_r points to an event under consideration.  The _a_r_g
  46.      argument is a copy of the _a_r_g passed to TTTTkkkk____RRRReeeessssttttrrrriiiiccccttttEEEEvvvveeeennnnttttssss;  it may be
  47.      used to provide _p_r_o_c with information it needs to filter events.  _P_r_o_c
  48.      must return TTTTrrrruuuueeee or FFFFaaaallllsssseeee.  TTTTrrrruuuueeee means the event should be processed
  49.      immediately and FFFFaaaallllsssseeee means the event should not be processed now, but
  50.      should be saved for some later time.
  51.  
  52.      TTTTkkkk____RRRReeeessssttttrrrriiiiccccttttEEEEvvvveeeennnnttttssss uses its return value and _p_r_e_v_A_r_g_P_t_r to return
  53.      information about the current event restriction procedure (a NULL return
  54.      value means there are currently no restrictions).  These values may be
  55.      used to restore the previous restriction state when there is no longer
  56.      any need for the current restriction.
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. TTTTkkkk____RRRReeeessssttttrrrriiiiccccttttEEEEvvvveeeennnnttttssss((((3333TTTTkkkk))))                                  TTTTkkkk____RRRReeeessssttttrrrriiiiccccttttEEEEvvvveeeennnnttttssss((((3333TTTTkkkk))))
  71.  
  72.  
  73.  
  74.      There are very few places where TTTTkkkk____RRRReeeessssttttrrrriiiiccccttttEEEEvvvveeeennnnttttssss is needed.  Please use
  75.      it only where it is absolutely necessary.  If only a local restriction is
  76.      needed, it can probably be achieved more cleanly by changing event-to-Tcl
  77.      bindings or by calling TTTTkkkk____DDDDeeeelllleeeetttteeeeEEEEvvvveeeennnnttttHHHHaaaannnnddddlllleeeerrrr.
  78.  
  79.  
  80. KKKKEEEEYYYYWWWWOOOORRRRDDDDSSSS
  81.      delay, event, filter, restriction
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.